home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / cups.prerm < prev    next >
Text File  |  2008-10-20  |  2KB  |  72 lines

  1. #! /bin/sh
  2. # prerm script for cups
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <prerm> `remove'
  10. #        * <old-prerm> `upgrade' <new-version>
  11. #        * <new-prerm> `failed-upgrade' <old-version>
  12. #        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
  13. #        * <deconfigured's-prerm> `deconfigure' `in-favour'
  14. #          <package-being-installed> <version> `removing'
  15. #          <conflicting-package> <version>
  16. # for details, see http://www.debian.org/doc/debian-policy/ or
  17. # the debian-policy package
  18.  
  19.  
  20. case "$1" in
  21.     remove)
  22.     (cd /usr/lib/cups/backend && rm -f http ipp lpd parallel scsi serial socket usb snmp dnssd)
  23.     if [ -L /usr/share/ppd/1-local-admin ]; then
  24.       rm -f /usr/share/ppd/1-local-admin
  25.     fi
  26.     if [ -L /usr/share/ppd/2-third-party ]; then
  27.       rm -f /usr/share/ppd/2-third-party
  28.     fi
  29.         ;;
  30.     upgrade|deconfigure)
  31.         ;;
  32.     failed-upgrade)
  33.         ;;
  34.     *)
  35.         echo "prerm called with unknown argument \`$1'" >&2
  36.         exit 1
  37.     ;;
  38. esac
  39.  
  40. # dh_installdeb will replace this with shell code automatically
  41. # generated by other debhelper scripts.
  42.  
  43. # Automatically added by dh_installdocs
  44. if [ "$1" = remove ] || [ "$1" = upgrade ] && \
  45.    which install-docs >/dev/null 2>&1; then
  46.     install-docs -r cups
  47. fi
  48. # End automatically added section
  49. # Automatically added by dh_installinit
  50. if [ -x "/etc/init.d/cups" ]; then
  51.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  52.         invoke-rc.d cups stop || exit $?
  53.     else
  54.         /etc/init.d/cups stop || exit $?
  55.     fi
  56. fi
  57. # End automatically added section
  58. # Automatically added by dh_usrlocal
  59. (
  60.     while read dir; do
  61.         rmdir "$dir" 2>/dev/null || true
  62.     done
  63. ) << DATA
  64. /usr/local/share/ppd
  65. DATA
  66. # End automatically added section
  67.  
  68.  
  69. exit 0
  70.  
  71.  
  72.